#pragma once
#include "sfm_basic.h"

namespace ville3d {
class TracksBuilder {
 public:
  TracksBuilder();
  ~TracksBuilder();

  /// Build tracks for a given series of pairWise matches
  bool Build(const std::vector<std::pair<IndexT, IndexT>> image_pair,
             const std::vector<Matches> matches, TrackSet& tracks);

  /// Build tracks for a given series of pairWise matches
  bool Build(const std::vector<std::pair<IndexT, IndexT>>& pts,
             const std::vector<std::pair<IndexT, IndexT>>& mpts,
             TrackSet& tracks);

   /// Remove bad tracks (too short or track with ids collision)
  bool Filter(TrackSet& tracks, std::size_t nLengthSupTo = 2);
};
}  // namespace ville3d